<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/19 0019
 * Time: 09:54
 */
namespace app\api\model;

use think\Model;

class Orders extends Model
{
    protected $dateFormat = 'y-m-d H:i:s';
    protected $type = [
        'starttime'    =>  'timestamp',
        'gettime'    =>  'timestamp',
        'finishtime'    =>  'timestamp',
        'add_time'    =>  'timestamp',
    ];
    public function getStatusAttr($value)
    {
        $yid = [0=>'未使用',1=>'95折优惠券',2=>'92折优惠换'];
        return $yid[$value];
    }
}